<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>桥梁养护系统</title>
    <link rel="shortcut icon" href="../asset/ico/favicon.ico">
    <link rel="Bookmark" href="../asset/ico/favicon.ico">
    <script src="https://cdn.bootcss.com/react/16.2.0/umd/react.production.min.js"></script>
    <script src="https://cdn.bootcss.com/react-dom/16.2.0/umd/react-dom.production.min.js"></script>

    <script src="https://cdn.bootcss.com/react-router/4.2.0/react-router.js"></script>
    <script src="https://cdn.bootcss.com/react-router-dom/4.2.2/react-router-dom.js"></script>

    <script src="https://cdn.bootcss.com/prop-types/15.6.0/prop-types.min.js"></script>

    <script src="https://cdn.bootcss.com/moment.js/2.19.4/moment.min.js"></script>

    <link href="https://cdn.bootcss.com/antd/3.0.3/antd.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/antd/3.0.3/antd.js"></script>

    <script src="https://cdn.bootcss.com/babel-standalone/6.26.0/babel.min.js"></script>

    <link href="https://cdn.bootcss.com/highlight.js/9.12.0/styles/vs2015.min.css" rel="stylesheet">
    <script src="https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js"></script>

    <script>hljs.initHighlightingOnLoad();</script>
    <style>
        .logo{
            margin:6px 0 0 0;
            padding:0;
            float:left;
            height: 54px;
        }
        .qkmenu{
            margin-top:6px;
        }
        .myfoot{
            line-height: 0;
        }
    </style>
</head>
<body>
<div id="root"></div>


<script type="text/babel">

    const {Layout, Menu, Icon } = antd;
    const SubMenu = Menu.SubMenu;
    const MenuItemGroup = Menu.ItemGroup;
    const { Header, Content, Footer, Sider } = Layout;

    class App extends React.Component {
        state = {
            current: 'mail',
        }
        handleClick = (e) => {
            console.log('click ', e);
            this.setState({
                current: e.key,
            });
        }
        render() {
            return (
                <Layout>
                    <Header>
                        <embed src={"../asset/svg/qklogog.svg"} type={"image/svg+xml"} className="logo" /><div className="logo"><span>　　　　</span></div>
                        <Menu
                            onClick={this.handleClick}
                            selectedKeys={[this.state.current]}
                            mode="horizontal"
                            theme="dark"
                            className="qkmenu"
                        >
                            <Menu.Item key="mail">
                                <Icon type="mail" />桥梁对象
                            </Menu.Item>
                            <Menu.Item key="heart">
                                <Icon type="heart-o" />病害统计
                            </Menu.Item>

                            <SubMenu title={<span><Icon type="setting" />视图</span>}>
                                <MenuItemGroup title="Item 1">
                                    <Menu.Item key="setting:1">Option 1</Menu.Item>
                                    <Menu.Item key="setting:2">Option 2</Menu.Item>
                                </MenuItemGroup>
                                <MenuItemGroup title="Item 2">
                                    <Menu.Item key="setting:3">Option 3</Menu.Item>
                                    <Menu.Item key="setting:4">Option 4</Menu.Item>
                                </MenuItemGroup>
                            </SubMenu>
                            <Menu.Item key="alipay">
                                <a href="http://qkzn.gitee.io" target="_blank" rel="noopener noreferrer">关于</a>
                            </Menu.Item>
                        </Menu>
                    </Header>
                    <Layout>
                        <Sider height="80vh">Sider<br/><br/><br/><br/><br/><br/>...</Sider>
                        <Content id='myobject'>Content</Content>
                        <Sider/>
                    </Layout>
                    <Footer className="myfoot" style={{ textAlign: 'center' }}>
                        桥康智能 ©2016
                    </Footer>
                </Layout>
            );
        }
    }

    ReactDOM.render(
        <App >
        </App>
        , document.getElementById('root')
    );
</script>

</body>
</html>